<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "goods_info".
 *
 * @property integer $id
 * @property string $orderno
 * @property string $product_name
 * @property integer $sale_num
 * @property string $unit_price
 */
class GoodsInfo extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'goods_info';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['sale_num'], 'integer'],
            [['unit_price'], 'number'],
            [['orderno'], 'string', 'max' => 20],
            [['product_name'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'orderno' => '订单号',
            'product_name' => '商品名称',
            'sale_num' => '销售数量',
            'unit_price' => '商品单价',
        ];
    }
}
